package Map;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Scanner;

public class Map03 {
    HashMap<String, ArrayList<String>> map=new HashMap<>();
    Scanner scanner = new Scanner(System.in);
    ArrayList arrayList = new ArrayList<>();
    ArrayList arrayList2 = new ArrayList<>();

    public  void getin(){

        arrayList.add("曲靖");
        arrayList.add("昆明");
        arrayList2.add("昭通");
        map.put("云南",arrayList);
        map.put("水富",arrayList2);


    }

    public void print(){
        Iterator<String> it=map.keySet().iterator();
        while (it.hasNext()){
            String key=it.next();
            System.out.print(key+"\t");
        }
    }

    public void choose(){

        System.out.println("输入省份");
        String choose = scanner.next();
        switch (choose){

            case "云南":
                System.out.println(map.get(choose));
                break;

            case "水富":
                System.out.println(map.get(choose));
                break;
            default:
                System.out.println("未录入");
        }
    }
}
